home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 21 / Cream of the Crop 21 (Terry Blount) (October 1996).iso / bbs / fmail120.zip / FMSTRUCT.ZIP / fmstruct.h < prev   
C/C++ Source or Header  |  1996-08-28  |  19KB  |  608 lines

  1.  
  2. /*
  3.    FMSTRUCT.H
  4.  
  5.         File structures for FMail 1.20
  6.         Copyright (C) 1996 Folkert J. Wijnstra. All rights reserved.
  7.  
  8.     All information in this document is subject to change at any time
  9.     without prior notice!
  10.  
  11.     Strings are NUL terminated arrays of char type.
  12.     Path names always end on a \ character (followed by NUL).
  13. */
  14.  
  15.  
  16. /**** Modify the type definitions below if necessary for your compiler ****/
  17.  
  18. #define fhandle signed int
  19. #define uchar unsigned char
  20. #define schar char
  21. #ifndef __32BIT__
  22. #define u16 unsigned int
  23. #define s16 signed int
  24. #else
  25. #define u16 short unsigned int
  26. #define s16 short signed int
  27. #endif
  28. #define u32 long unsigned int
  29. #define s32 long signed int
  30. #define udef unsigned int
  31. #define sdef signed int
  32.  
  33. #define MAX_U32    0xFFFFFFFFL
  34.  
  35.  
  36. /* ********** General structures ********** */
  37.  
  38. typedef struct
  39. {  uchar programName[46];
  40.    u16   memRequired;      } archiverInfo;
  41.  
  42. typedef uchar pathType[48];
  43.  
  44. typedef struct
  45. {  u16   zone;
  46.    u16   net;
  47.    u16   node;
  48.    u16   point; } nodeNumType;
  49.  
  50. typedef struct
  51. {  nodeNumType nodeNum;
  52.    u16         fakeNet; } nodeFakeType;
  53.  
  54.  
  55. /* ********** File header structure ********** */
  56.  
  57. #define DATATYPE_CF    0x0102 /* not used yet              */
  58. #define DATATYPE_NO    0x0202 /* node file                        */
  59. #define DATATYPE_AD    0x0401 /* area file for echo mail defaults */
  60. #define DATATYPE_AE    0x0402 /* area file for echo mail          */
  61.  
  62. typedef struct
  63. {  uchar versionString[32]; /* Always starts with 'FMail' */
  64.    u16   revNumber;         /* Is now 0x0100 */
  65.    u16   dataType;          /* See #defines above */
  66.    u16   headerSize;
  67.    s32   creationDate;
  68.    s32   lastModified;
  69.    u16   totalRecords;
  70.    u16   recordSize;
  71. } headerType;
  72.  
  73.  
  74. /* The structure below is used by the Areas File and (only partly)
  75.    by the Config File */
  76.  
  77. typedef struct
  78. {  unsigned active      : 1; /* Bit  0 */
  79.    unsigned tinySeenBy  : 1; /* Bit  1 */
  80.    unsigned security    : 1; /* Bit  2 */
  81.    unsigned             : 1; /* Bit  3 */
  82.    unsigned allowPrivate: 1; /* Bit  4 */
  83.    unsigned impSeenBy   : 1; /* Bit  5 */
  84.    unsigned checkSeenBy : 1; /* Bit  6 */
  85.    unsigned             : 1; /* Bit  7 */
  86.    unsigned local       : 1; /* Bit  8 */
  87.    unsigned disconnected: 1; /* Bit  9 */
  88.    unsigned _reserved   : 1; /* Bit 10 */
  89.    unsigned allowAreafix: 1; /* Bit 11 */
  90.    unsigned             : 2; /* Bit 12-13 */
  91.    unsigned arrivalDate : 1; /* Bit 14 */
  92.    unsigned sysopRead   : 1; /* Bit 15 */   } areaOptionsType;
  93.  
  94.  
  95. /* ********** FMAIL.CFG ********** */
  96.  
  97. #define MAX_AKAS      32
  98. #define MAX_AKAS_F    64
  99. #define MAX_AKAS_OLD  16
  100. #define MAX_NA_OLD    11
  101. #define MAX_NETAKAS   32
  102. #define MAX_NETAKAS_F 64
  103. #define MAX_USERS     16
  104. #define MAX_UPLREQ    32
  105. #define MAX_MATCH     16           // not used yet
  106.  
  107. #define LOG_NEVER     0x0000
  108. #define LOG_INBOUND   0x0001
  109. #define LOG_OUTBOUND  0x0002
  110. #define LOG_PKTINFO   0x0004
  111. #define LOG_XPKTINFO  0x0008
  112. #define LOG_UNEXPPWD  0x0010
  113. #define LOG_SENTRCVD  0x0020
  114. #define LOG_STATS     0x0040
  115. #define LOG_PACK      0x0080
  116. #define LOG_MSGBASE   0x0100
  117. #define LOG_ECHOEXP   0x0200
  118. #define LOG_NETIMP    0x0400
  119. #define LOG_NETEXP    0x0800
  120. #define LOG_OPENERR   0x1000
  121. #define LOG_EXEC      0x2000
  122. #define LOG_NOSCRN    0x4000
  123. #define LOG_ALWAYS    0x8000
  124. #define LOG_DEBUG     0x8000
  125.  
  126. typedef nodeFakeType _akaListType[MAX_AKAS_OLD];
  127. typedef nodeFakeType akaListType[MAX_AKAS_F];
  128.  
  129. typedef struct
  130. {
  131.    unsigned useEMS       : 1; /* BIT 0 */
  132.    unsigned checkBreak   : 1; /* BIT 1 */
  133.    unsigned swap         : 1; /* BIT 2 */
  134.    unsigned swapEMS      : 1; /* BIT 3 */
  135.    unsigned swapXMS      : 1; /* BIT 4 */
  136.    unsigned              : 1;
  137.    unsigned monochrome   : 1; /* BIT 6 */
  138.    unsigned commentFFD   : 1; /* BIT 7 */
  139.    unsigned PTAreasBBS   : 1; /* BIT 8 */
  140.    unsigned commentFRA   : 1; /* BIT 9 */
  141.    unsigned              : 1; /* BIT 10 */
  142.    unsigned incBDRRA     : 1; /* BIT 11 */
  143.    unsigned              : 1; /* BIT 12 */
  144.    unsigned              : 2;
  145.    unsigned _RA2         : 1; /* BIT 15 */  } genOptionsType;
  146.  
  147. typedef struct
  148. {
  149.    unsigned removeNetKludges : 1; /* Bit 0 */
  150.    unsigned addPointToPath   : 1; /* Bit 1 */
  151.    unsigned checkPktDest     : 1; /* Bit 2 */
  152.    unsigned neverARC060      : 1; /* Bit 3 */
  153.    unsigned createSema       : 1; /* Bit 4 */
  154.    unsigned dailyMail         : 1; /* Bit 5 */
  155.    unsigned warnNewMail      : 1; /* bit 6 */
  156.    unsigned killBadFAtt      : 1; /* Bit 7 */
  157.    unsigned dupDetection     : 1; /* Bit 8 */
  158.    unsigned ignoreMSGID      : 1; /* Bit 9 */
  159.    unsigned ARCmail060       : 1; /* Bit 10 */
  160.    unsigned extNames         : 1; /* Bit 11 */
  161.    unsigned persNetmail      : 1; /* Bit 12 */
  162.    unsigned privateImport    : 1; /* Bit 13 */
  163.    unsigned keepExpNetmail   : 1; /* Bit 14 */
  164.    unsigned killEmptyNetmail : 1; /* Bit 15 */  } mailOptionsType;
  165.  
  166. typedef struct
  167. {
  168.    unsigned sortNew      : 1; /* bit  0   */
  169.    unsigned sortSubject  : 1; /* bit  1   */
  170.    unsigned updateChains : 1; /* bit  2   */
  171.    unsigned reTear       : 1; /* bit  3   */
  172.    unsigned              : 1; /* bit  4   */
  173.    unsigned              : 1; /* bit  5   */
  174.    unsigned removeRe     : 1; /* bit  6   */
  175.    unsigned removeLfSr   : 1; /* bit  7   */
  176.    unsigned scanAlways   : 1; /* bit  8   */
  177.    unsigned scanUpdate   : 1; /* bit  9   */
  178.    unsigned multiLine    : 1; /* bit 10   */
  179.    unsigned              : 1; /* bit 11   */
  180.    unsigned quickToss    : 1; /* bit 12   */
  181.    unsigned              : 1; /* bit 13   */
  182.    unsigned              : 1; /* bit 14   */
  183.    unsigned sysopImport  : 1; /* bit 15   */ } mbOptionsType;
  184.  
  185. typedef struct
  186. {
  187.    unsigned keepRequest  : 1; /* Bit  0 */
  188.    unsigned keepReceipt  : 1; /* Bit  1 */
  189.    unsigned              : 2; /* Bit 2-3 */
  190.    unsigned autoDiscArea : 1; /* Bit  4 */
  191.    unsigned autoDiscDel  : 1; /* Bit  5 has temp. no effect, rec is always deleted */
  192.    unsigned              : 3; /* Bit 6-8 */
  193.    unsigned allowAddAll  : 1; /* Bit  9 */
  194.    unsigned allowActive  : 1; /* Bit 10 */
  195.    unsigned              : 1; /* Bit 11 */
  196.    unsigned allowPassword: 1; /* Bit 12 */
  197.    unsigned allowPktPwd  : 1; /* Bit 13 */
  198.    unsigned allowNotify  : 1; /* Bit 14 */
  199.    unsigned allowCompr   : 1; /* Bit 15 */  } mgrOptionsType;
  200. #if 0
  201. typedef struct
  202. {
  203.    unsigned active      : 1; /* Bit  0 */
  204.    unsigned tinySeenBy  : 1; /* Bit  1 */
  205.    unsigned security    : 1; /* Bit  2 */
  206.    unsigned             : 1; /* Bit  3 */
  207.    unsigned allowPrivate: 1; /* Bit  4 */
  208.    unsigned impSeenBy   : 1; /* Bit  5 */
  209.    unsigned checkSeenBy : 1; /* Bit  6 */
  210.    unsigned             : 1; /* Bit  7 */
  211.    unsigned local       : 1; /* Bit  8 */
  212.    unsigned             : 1; /* Bit  9 */
  213.    unsigned passThrough : 1; /* Bit 10 */
  214.    unsigned             : 3; /* Bit 11-13 */
  215.    unsigned arrivalDate : 1; /* Bit 14 */
  216.    unsigned sysopRead   : 1; /* Bit 15 */     } defaultOptionsType;
  217. #endif
  218. typedef struct
  219. {
  220.    unsigned addPlusPrefix :  1; /* BIT 0 */
  221.    unsigned               :  3;
  222.    unsigned unconditional :  1; /* BIT 4 */
  223.    unsigned               : 11;    } uplOptType;
  224.  
  225. typedef struct
  226. {
  227.    uchar userName[36];
  228.    uchar reserved[28];
  229. } userType;
  230.  
  231. typedef struct
  232. {
  233.    nodeNumType node;
  234.    uchar       program[9];
  235.    uchar       password[17];
  236.    uchar       fileName[13];
  237.    uchar       fileType;
  238.    u32         groups;
  239.    uchar       originAka;
  240.    uplOptType  options;
  241.    uchar       reserved[9];  } uplinkReqType;
  242.  
  243. typedef struct
  244. {  u16   valid;
  245.    u16   zone;
  246.    u16   net;
  247.    u16   node;    } akaMatchNodeType;
  248.  
  249. typedef struct
  250. {
  251.    akaMatchNodeType amNode;
  252.    u16              aka;    } akaMatchType;
  253.  
  254. /* ATTENTION: FMAIL.CFG does NOT use the new config file type yet (no header) !!! */
  255.  
  256. typedef struct
  257. {
  258.    uchar           versionMajor;
  259.    uchar           versionMinor;
  260.    s32             creationDate;
  261.    u32             key;
  262.    u32             reservedKey;
  263.    u32             relKey1;
  264.    u32             relKey2;
  265.    uchar           reserved1[22];
  266.    mgr